<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>practice</title>
    <script src="../jQuery/js/jquery-1.12.4.min.js"></script>
    <script>
        $(function(){
            var $h1=$('h1')
            $h1.css({color:'red'})
            $h1.prev().css({color:'green'})
            $h1.prev().html('test')
            $h1.prev().append('ok')
            $("input[value=test]").prop({value:'ok'})
        })
    </script>
</head>
<body>
    <div>
        <p>p</p>
        <h1>h1</h1>
        <h3>h3</h3>
        <input type="button" value="test">
    </div>
    
</body>
</html>